package com.xwh.week4;
public class Practice10 {
   static int[] arrays=new int[7];
   static int n=0;
    public static void main(String[] args) {
        String s = new String();
        int ans=1;
        int flag=10;
        int bit=0;
        for(int i=1;i<1000000;i++){
            s=new String(i+"");
            bit+=method(i);
            if(bit>flag){
                ans*=s.charAt(method(i)-(bit-flag)-1)-'0';
                arrays[n++]=s.charAt(bit-flag-1)-'0';
                flag*=10;
            }
            if(flag==10000000){
                break;
            }

        }
        System.out.println(ans);
    }
    public static int method(int n){
        int ans=0;
        while(n>0){
            ans++;
            n/=10;
        }
        return ans;
    }
}
